#!/bin/bash
#created by douyu
ls 123/*.txt >list.txt
##find 123/ -type f -name "*.txt" > list.txt
for i in `ls 123/*.txt`
do
  mv $i $i.bak
done

tar -zcf 123.tar.gz 123/*.bak

for i in `cat list.txt`
do
  mv $i.bak $i
done
